package org.example.order.controller;

import org.example.order.feign.StockFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author tds
 * @version 1.0.0
 * @Company
 * @ClassName OrderController
 * @Description TODO（这里用一句话描述这个类的作用)
 * @Date 2023-04-12 21:46
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private StockFeign stockFeign;

    @RequestMapping("/add")
    public String add() {
        String res = stockFeign.deduct();
        return res;
    }

}
